<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .red{
            color: red;
        }

        .orange{
            color: orange;
        }

        .orangered{
            color: orangered;
        }
    </style>
</head>
<body>
    
    <div id="app">
        <ul>
            <li v-for="item in num">
                
                <span v-if="item === 1" class="red">
                    {{ item }}
                </span>

                <span v-else-if="item === 2" class="orangered">
                    {{ item }}
                </span>

                <span v-else-if="item === 3" class="orange">
                    {{ item }}
                </span>

                <span v-else>
                    {{ item }}
                </span>
            </li>
        </ul>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
    <script>
        new Vue({
            // 元素
            el: "#app",
            // 定义的数据(状态)
            data: {
                num: 10
            }
        })
    </script>
</body>
</html>